<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $title; ?></title>
    <link rel="stylesheet" href="/public/css/style.css">
</head>
<body>
    <h1>用户注册</h1>
    <?php if (!empty($error_msg)): ?>
        <div class="error"><?php echo $error_msg; ?></div>
    <?php endif; ?>
    <?php if (!empty($success_msg)): ?>
        <div class="success"><?php echo $success_msg; ?></div>
    <?php endif; ?>
    <form action="/open/doRegister" method="post">
        <div class="form-group">
            <label for="username">用户名：</label>
            <input type="text" id="username" name="username" required>
        </div>
        <div class="form-group">
            <label for="password">密码：</label>
            <input type="password" id="password" name="password" required>
        </div>
        <div class="form-group">
            <label for="confirm_password">确认密码：</label>
            <input type="password" id="confirm_password" name="confirm_password" required>
        </div>
        <button type="submit">注册</button>
    </form>
    <p>已有账号？<a href="/open/login">立即登录</a></p>
</body>
</html>